﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmRecetaLista.aspx.cs" Inherits="WebMenu.Pagina.Mantenimiento.frmRecetaLista" %>

<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    <link href="../../style/css/smoothness/jquery-ui.css" rel="stylesheet" />
    <script src="../../style/script/jquery-1.11.2.js"></script>
    <script src="../../style/script/jquery-ui.js"></script>
    <script src="../../scriptEvento/js_combo.js"></script>

    <style>
        body {
            font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif";
            font-size: 80.5%;
        }

        .custom-combobox {
            position: relative;
            display: inline-block;
        }

        .custom-combobox-toggle {
            position: absolute;
            top: 0;
            bottom: 0;
            margin-left: -1px;
            padding: 0;
        }

        .custom-combobox-input {
            margin: 0;
            padding: 5px 10px;
        }

        /*Jhonny */
        .ocultar {
            display: none;
        }

        .auto-style1 {
            width: 30px;
        }
        /*Jhonny */
    .auto-style2 {
        width: 2px;
    }
    </style>
    <script>
        var pagEdicion = "frmRecetaEdicion.aspx";

        $(function () {
            $("#<%=ddlTipo.ClientID %>").combobox();
            $("#toggle").click(function () {
                $("#<%=ddlTipo.ClientID %>").toggle();
            });
            $("#<%=ddlClase.ClientID %>").combobox();
            $("#toggle").click(function () {
                $("#<%=ddlClase.ClientID %>").toggle();
            });
        });

        function NuevoRegistro() {            
            location.href = "frmRecetaEdicion.aspx?ID_Receta=0";
        }        
    </script>
    <br>   <br>   <br>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <Triggers>

            <asp:AsyncPostBackTrigger ControlID="btnBuscar" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="btnNuevo" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="btnEditar" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="btnEliminar" EventName="Click" />

        </Triggers>
        <ContentTemplate>
<table>
        <tr>
            <td></td>
            <td></td>
            <td></td>
            <td class="auto-style1"></td>
            <td></td>
            <td></td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td></td>
            <td colspan="5">Lista de receta</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td></td>
            <td></td>
            <td></td>
            <td class="auto-style1"></td>
            <td></td>
            <td></td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td></td>
            <td>Plato para el :</td>
            <td>
                <div class="ui-widget">
                    <asp:DropDownList ID="ddlTipo" runat="server">
                    </asp:DropDownList>
                </div>
            </td>
            <td class="auto-style1">&nbsp;</td>
            <td>Clase de Plato: </td>
            <td>
                <div class="ui-widget">
                    <asp:DropDownList ID="ddlClase" runat="server">
                    </asp:DropDownList>
                </div>
            </td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td></td>
            <td>Receta:</td>
            <td>
                <asp:TextBox ID="txtReceta" runat="server"></asp:TextBox>
            </td>
            <td class="auto-style1"></td>
            <td></td>
            <td></td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td></td>
            <td colspan="4">
                <asp:Button ID="btnNuevo" runat="server" Text="Nuevo" OnClick="btnNuevo_Click" />
                <asp:Button ID="btnEditar" runat="server" Text="Editar" OnClick="btnEditar_Click" />
                <asp:Button ID="btnEliminar" runat="server" Text="Eliminar" OnClick="btnEliminar_Click" />
            </td>
            <td style="text-align: right">
                <asp:Button ID="btnBuscar" runat="server" Text="Buscar" /></td>
            <td></td>
        </tr>
        <tr>
            <td></td>
            <td colspan="5">
                <asp:GridView ID="gvReceta" runat="server" AutoGenerateColumns="False">
                    <Columns>
                        <asp:TemplateField HeaderText="Selec.">
                            <ItemTemplate>
                                <asp:CheckBox ID="cbSelec" runat="server" />
                                <asp:HiddenField ID="hdIdReceta" runat="server" Value='<%# Eval("ID_RECETA") %>' />
                                <asp:HiddenField ID="hdEst" runat="server" Value='<%# Eval("EST_RECETA") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="NOMBRE_REC" HeaderText="Nombre Receta" />
                        <asp:BoundField DataField="DESC_TIPO_PLATO" HeaderText="Plato" />
                        <asp:BoundField DataField="DESC_CLASE_PLATO" HeaderText="Clase de Plato" />
                        <asp:BoundField DataField="DESC_EST_RECETA" HeaderText="Estado" />
                        <asp:BoundField DataField="ID_RECETA" HeaderText="IdReceta" HeaderStyle-CssClass="ocultar" ItemStyle-CssClass="ocultar" />
                        <asp:BoundField DataField="TIPO_PLATO" HeaderText="IdTPlato" HeaderStyle-CssClass="ocultar" ItemStyle-CssClass="ocultar" />
                        <asp:BoundField DataField="CLASE_PLATO" HeaderText="IdClPlato" HeaderStyle-CssClass="ocultar" ItemStyle-CssClass="ocultar" />
                        <asp:BoundField DataField="EST_RECETA" HeaderText="IdEstado" HeaderStyle-CssClass="ocultar" ItemStyle-CssClass="ocultar" />
                    </Columns>
                </asp:GridView>
            </td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td></td>
            <td></td>
            <td></td>
            <td class="auto-style1"></td>
            <td></td>
            <td></td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td class="auto-style1">&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td class="auto-style1">&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
    </table>
        </ContentTemplate>
    </asp:UpdatePanel>
    

</asp:Content>
